<html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
	<title>webslideshow.import.rules.title</title>

	<link href="ContextMenu/ContextMenu.css" rel="stylesheet" type="text/css">

	<style TYPE="text/css">
		BODY {
			background: #ece9d8;
			padding: 5px;
			overflow: hidden;
			font-size: 14px;
		}
		TABLE {
			font-size: 14px;
		}
		#tab_rules {
			width: 100%;
			height: 100%;
			min-height:200px;
		}
		#rules_tree {
			width:100%;
		}
		div.tree_container {
			clear: both;
			border: 1px solid #7f9db9;
			overflow: auto;
			height: expression(offsetParent.clientHeight - 30);
			width: 100%;
			min-height: 100px;
			background: white;
		}
		/* define width of table. IE browsers only                 */
		div.tree_container table {
			float: left;
			width: 100%;
		}
		thead.fixed_header tr {
			position: relative;
			top: expression(offsetParent.scrollTop);
		}
		thead.fixed_header th {
			background: #ebeadb;
			font-weight: normal;
			padding: 4px 3px;
			text-align: left
		}
		.minTagHeight {
			clear: right;
			float:right;
			height: 300px;
			width:1px;
		}
		.minTabWidth {
			width: 700px;
			height:1px;
		}
		.treeSelectedRow {
			background: #316ac5;
			color: white;
		}
		.treeDisabledRow {
			color: gray;
		}
		.treeRow {
			color: black;
		}
	</style>

	<script src="adapter/WindowArguments.js" language="jscript" type="text/jscript"></script>
	<script src="factory/ComponentsFactory.js" language="jscript" type="text/jscript"></script>
	<script src="factory/Factory.js" language="jscript" type="text/jscript"></script>
	<script src="Logger.js" language="jscript" type="text/jscript"></script>
	<script src="ResourceBundle.js" language="jscript" type="text/jscript"></script>
	<script src="Configuration.js" language="jscript" type="text/jscript"></script>
	<script src="util/BrowserDependent.js" language="jscript" type="text/jscript"></script>
	<script src="util/KeyboardHelper.js" language="jscript" type="text/jscript"></script>
	<script src="util/Util.js" language="jscript" type="text/jscript"></script>
	<script src="util/Prompt.js" language="jscript" type="text/jscript"></script>
	<script src="util/SimpleXMLHelper.js" language="jscript" type="text/jscript"></script>
	<script src="util/WebNavigationHelper.js" language="jscript" type="text/jscript"></script>
	<script src="util/HTMLContentHelper.js" language="jscript" type="text/jscript"></script>
	<script src="util/ObserverServiceHelper.js" language="jscript" type="text/jscript"></script>
	<script src="WindowManager.js" language="jscript" type="text/jscript"></script>
	<script src="WebProfiles.js" language="jscript" type="text/jscript"></script>
	<script src="WebProfiles.impl.js" language="jscript" type="text/jscript"></script>
	<script src="WebProfilesMergeHelper.js" language="jscript" type="text/jscript"></script>
	<script src="RulesImportManager.js" language="jscript" type="text/jscript"></script>
	<script src="RuleTree.js" language="jscript" type="text/jscript"></script>
	<script src="ImportRules.js" language="jscript" type="text/jscript"></script>

	<script language="jscript" type="text/jscript">
		var windowManager = null;
		try
		{
			windowManager = wsshWindowManager.getManager();
		}
		catch(e) {}

		function onPageLoad()
		{
			try
			{
		        var progressmeterImg = document.getElementById("progressmeter_img");
				progressmeterImg.src = windowManager.resolveURL("res://{8706081B-A7C0-4EC6-BDFF-A6F54B24A837}/PROGRESS.GIF");
			}
			catch(e) {}
		    
			onLoad();

			try
			{
				windowManager.clearDialogTitle(window);
				windowManager.setDialogStatus(window, document.title);
			}
			catch(e) {}
		}
		function onTableClick()
		{
			var target = window.event.srcElement;
			var tr = yrprxHTMLContentHelper.getParentWithTag(target, "TR");
			if (!tr && target.tagName == "TR")
				tr = target;
			if (!tr)
				return;

			selectTreeNode(gRuleTreeView.findRowIndex(tr));
		}
		function onTableKeypress()
		{
			var activeElement = document.activeElement;
			if (!yrprxHTMLContentHelper.hasParentWithId(activeElement, "tree_container"))
				return true;

			var event = window.event;
			var keyCode = event.keyCode;

			if (keyCode == yrprxKeyboardHelper.VK_UP && !event.ctrlKey)
				selectTreeNode(gRuleTree.currentIndex-1);
			else if (keyCode == yrprxKeyboardHelper.VK_DOWN && !event.ctrlKey)
				selectTreeNode(gRuleTree.currentIndex+1);
			else
				return true;

			return false;
		}
		function getAcceptButton()
		{
			return document.getElementById("button-ok");
		}
	</script>
</head>
<body onload="onPageLoad();" onkeydown="return onTableKeypress();" oncontextmenu="return false;" onselectstart="return false;">

	<table style="width: 100%;height: 100%;" cellpadding="0" cellspacing="0">
	<tr><td style="height: 100%;">
		<div class="minTagHeight"></div>
		<div id="tab_rules">
			<div id="tree_container" class="tree_container">
			<table id="rules_tree" cellpadding="2" cellspacing="0">
			<thead class="fixed_header">
				<tr>
					<th align="center" style="border-right:1px solid darkgray;border-bottom:1px solid darkgray;width:20%">
						<NOBR>&nbsp;&nbsp;&nbsp;<strong>Domain</strong>&nbsp;&nbsp;&nbsp;</NOBR>
					</th>
					<th align="center" style="border-right:1px solid darkgray;border-bottom:1px solid darkgray;width:40%">
						<NOBR>&nbsp;&nbsp;&nbsp;<strong>Page Pattern</strong>&nbsp;&nbsp;&nbsp;</NOBR>
					</th>
					<th align="center" style="border-bottom:1px solid darkgray;width:40%">
						<NOBR>&nbsp;&nbsp;&nbsp;<strong>Image Pattern</strong>&nbsp;&nbsp;&nbsp;</NOBR>
					</th>
				</tr>
			</thead>
			<tbody id="rules_treechildren" class="scrollContent" onclick="onTableClick();">
			<tr id="progressmeter"><td colspan="3" valign="middle" align="center">
			    <br/><br/><br/><br/><br/>
			    <img id="progressmeter_img" src="PROGRESS.GIF"/>
			</td></tr>
			</tbody>
			</table>
			</div>
			<nobr>
				<input type="checkbox" id="enable_javascript" disabled>webslideshow.import.rules.enable.javascript
			</nobr>
		</div>
	</td></tr>
	<tr><td align="right" valign="bottom" style="padding:4px;">
	<div class="minTabWidth">
		<input id="button-ok"     type="button" value="webslideshow.import.rules.button.ok"     onclick='if (onOK()) yrprxBrowser.closeWindow();'>
		<input id="button-cancel" type="button" value="webslideshow.import.rules.button.cancel" onclick='yrprxBrowser.closeWindow();'>
	</div>
	</td></tr>
	</table>
</body>
</html>